package com.jmpt.fangbohui.ui.holder;

import android.content.Context;
import android.view.View;
import android.widget.TextView;

import com.jmpt.fangbohui.R;
import com.jmpt.fangbohui.bean.NewHouseDetailBean.New;
import com.jmpt.fangbohui.ui.base.BaseViewHolder;
import com.lidroid.xutils.ViewUtils;
import com.lidroid.xutils.view.annotation.ViewInject;

public class NewsItemHolder extends BaseViewHolder<New> {
	
	@ViewInject(R.id.tv_news_title)
	private TextView tv_news_title;
	
	@ViewInject(R.id.tv_news_content)
	private TextView tv_news_content;
	
	@ViewInject(R.id.tv_news_time)
	private TextView tv_news_time;

	public NewsItemHolder(Context context) {
		super(context);
	}

	@Override
	protected View initView() {
		View view = View.inflate(mContext, R.layout.news_item, null);
		
		ViewUtils.inject(this, view);
		
		return view;
	}

	@Override
	protected void refreshView(New new1) {
		tv_news_title.setText(new1.getTitle());
		tv_news_content.setText(new1.getContent());
		tv_news_time.setText(new1.getAddtime());
	}

}
